# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BareMetalSolution.V2.Model.NfsShare do
  @moduledoc """
  An NFS share.

  ## Attributes

  *   `allowedClients` (*type:* `list(GoogleApi.BareMetalSolution.V2.Model.AllowedClient.t)`, *default:* `nil`) - List of allowed access points.
  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. An identifier for the NFS share, generated by the backend. This is the same value as nfs_share_id and will replace it in the future.
  *   `labels` (*type:* `map()`, *default:* `nil`) - Labels as key value pairs.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the NFS share.
  *   `nfsShareId` (*type:* `String.t`, *default:* `nil`) - Output only. An identifier for the NFS share, generated by the backend. This field will be deprecated in the future, use `id` instead.
  *   `pod` (*type:* `String.t`, *default:* `nil`) - Immutable. Pod name. Pod is an independent part of infrastructure. NFSShare can only be connected to the assets (networks, instances) allocated in the same pod.
  *   `requestedSizeGib` (*type:* `String.t`, *default:* `nil`) - The requested size, in GiB.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the NFS share.
  *   `storageType` (*type:* `String.t`, *default:* `nil`) - Immutable. The storage type of the underlying volume.
  *   `volume` (*type:* `String.t`, *default:* `nil`) - Output only. The underlying volume of the share. Created automatically during provisioning.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :allowedClients => list(GoogleApi.BareMetalSolution.V2.Model.AllowedClient.t()) | nil,
          :id => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :nfsShareId => String.t() | nil,
          :pod => String.t() | nil,
          :requestedSizeGib => String.t() | nil,
          :state => String.t() | nil,
          :storageType => String.t() | nil,
          :volume => String.t() | nil
        }

  field(:allowedClients, as: GoogleApi.BareMetalSolution.V2.Model.AllowedClient, type: :list)
  field(:id)
  field(:labels, type: :map)
  field(:name)
  field(:nfsShareId)
  field(:pod)
  field(:requestedSizeGib)
  field(:state)
  field(:storageType)
  field(:volume)
end

defimpl Poison.Decoder, for: GoogleApi.BareMetalSolution.V2.Model.NfsShare do
  def decode(value, options) do
    GoogleApi.BareMetalSolution.V2.Model.NfsShare.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BareMetalSolution.V2.Model.NfsShare do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
